/**
 * 项目示例-列表表头
 * Date 2023-5-25 09:33:56
 * 可选参数可参考：https://element-plus.org/zh-CN/component/table.html#table-column-属性
 */
// 数据展示
export const exampleColumns = [
  { prop: 'name', label: '目录名称', width:280, align:'left',ellipsis:true},
  { prop: 'createUser', label: '创建用户', minWidth: 60, align:'center',
    formatter: function (row: any, column: any, cellValue: any) {
      if(cellValue&&cellValue.name)return cellValue.name
      else return '/'
    }},
  { prop: 'createTime', label: '创建时间', minWidth: 120, align: 'center'},
  { prop: 'childQuantity', label: '子文件夹数量', minWidth: 80, align:'center'},
  { prop: 'fileQuantity', label: '文件数量', minWidth: 60, align: 'center' },
  { prop: 'isValid', label: '是否有效', minWidth: 60, align: 'center',
    formatter: function (row: any, column: any, cellValue: any) {
      if(cellValue==1) return "是"
      if(cellValue==0)return "否"
      else return '/'
    }},
  { prop: 'action', label: '操作', width: 350, align: 'center' }
];

// 历史记录数据展示
export const exampleHistoryColumns = [
  { type: 'index', label: '序号', minWidth:30, align:'center'},
  { prop: 'name', label: '目录名称', minWidth: 60, align:'center'},
  { prop: 'event', label: '操作事件', minWidth: 60, align: 'center' },
  { prop: 'path', label: '路径', minWidth: 120, align:'center'},
  { prop: 'createTime', label: '时间', minWidth: 60, align: 'center' },
  { prop: 'createUserName', label: '操作人', minWidth: 60, align: 'center' },
];
